package classesBancodeDados;

import classesMiolo.AntecedFamiliares;
import classesMiolo.AntecedPessoais;
import classesMiolo.ExameFisico;
import classesMiolo.FichaKey;
import classesMiolo.InterrogSintomABD;
import classesMiolo.InterrogSintomAGU;
import classesMiolo.InterrogSintomARACV;
import classesMiolo.InterrogSintomCabecaPescoco;
import classesMiolo.InterrogSintomGeral;
import classesMiolo.InterrogSintomSME;
import classesMiolo.InterrogSintomSNPSQ;
import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.IdClass;

@Entity
@IdClass(FichaKey.class)
public class FichaAdmissaoMedica implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    private String nPront;
    @Id
    private String sus;

    private String dataAdmissao;
    private String qpd;
    private String hda;
    private String medicacoesUso;
    private AntecedFamiliares af;
    private AntecedPessoais ap;
    private ExameFisico ef;
    private InterrogSintomABD isabd;
    private InterrogSintomAGU isagu;
    private InterrogSintomARACV isaracv;
    private InterrogSintomCabecaPescoco iscp;
    private InterrogSintomGeral isg;
    private InterrogSintomSME issme;
    private InterrogSintomSNPSQ issnpsq;

    public FichaAdmissaoMedica() {
        this.nPront = "";
        this.sus = "";
        this.dataAdmissao = "";
        this.qpd = "";
        this.hda = "";
        this.medicacoesUso = "";
        this.af = new AntecedFamiliares();
        this.ap = new AntecedPessoais();
        this.ef = new ExameFisico();
        this.isabd = new InterrogSintomABD();
        this.isagu = new InterrogSintomAGU();
        this.isaracv = new InterrogSintomARACV();
        this.iscp = new InterrogSintomCabecaPescoco();
        this.isg = new InterrogSintomGeral();
        this.issme = new InterrogSintomSME();
        this.issnpsq = new InterrogSintomSNPSQ();
    }
    
    public FichaAdmissaoMedica(String nPront, String sus, String dataAdmissao,
                               String qpd, String hda, String medicacoesUso,
                               AntecedFamiliares af, AntecedPessoais ap,
                               ExameFisico ef, InterrogSintomABD isabd,
                               InterrogSintomAGU isagu, InterrogSintomARACV isaracv,
                               InterrogSintomCabecaPescoco iscp, InterrogSintomGeral isg,
                               InterrogSintomSME issme, InterrogSintomSNPSQ issnpsq) {
        this.nPront = nPront;
        this.sus = sus;
        this.dataAdmissao = dataAdmissao;
        this.qpd = qpd;
        this.hda = hda;
        this.medicacoesUso = medicacoesUso;
        this.af = af;
        this.ap = ap;
        this.ef = ef;
        this.isabd = isabd;
        this.isagu = isagu;
        this.isaracv = isaracv;
        this.iscp = iscp;
        this.isg = isg;
        this.issme = issme;
        this.issnpsq = issnpsq;
    }
    
    public String getNumeroProntuario() {
        return nPront;
    }

    public void setNumeroProntuario(String nPront) {
        this.nPront = nPront;
    }

    public String getSus() {
        return sus;
    }

    public void setSus(String sus) {
        this.sus = sus;
    }   

    public String getDataAdmissao() {
        return dataAdmissao;
    }

    public void setDataAdmissao(String dataAdmissao) {
        this.dataAdmissao = dataAdmissao;
    }

    public String getQpd() {
        return qpd;
    }

    public void setQpd(String qpd) {
        this.qpd = qpd;
    }

    public String getHda() {
        return hda;
    }

    public void setHda(String hda) {
        this.hda = hda;
    }

    public String getMedicacoesUso() {
        return medicacoesUso;
    }

    public void setMedicacoesUso(String medicacoesUso) {
        this.medicacoesUso = medicacoesUso;
    }

    public AntecedFamiliares getAntecedFamiliares() {
        return af;
    }

    public void setAntecedFamiliares(AntecedFamiliares af) {
        this.af = af;
    }

    public AntecedPessoais getAntecedPessoais() {
        return ap;
    }

    public void setAntecedPessoais(AntecedPessoais ap) {
        this.ap = ap;
    }

    public ExameFisico getExameFisico() {
        return ef;
    }

    public void setExameFisico(ExameFisico ef) {
        this.ef = ef;
    }

    public InterrogSintomABD getInterrogSintomABD() {
        return isabd;
    }

    public void setInterrogSintomABD(InterrogSintomABD isabd) {
        this.isabd = isabd;
    }

    public InterrogSintomAGU getInterrogSintomAGU() {
        return isagu;
    }

    public void setInterrogSintomAGU(InterrogSintomAGU isagu) {
        this.isagu = isagu;
    }

    public InterrogSintomARACV getInterrogSintomARACV() {
        return isaracv;
    }

    public void setInterrogSintomARACV(InterrogSintomARACV isaracv) {
        this.isaracv = isaracv;
    }

    public InterrogSintomCabecaPescoco getInterrogSintomCabecaPescoco() {
        return iscp;
    }

    public void setInterrogSintomCabecaPescoco(InterrogSintomCabecaPescoco iscp) {
        this.iscp = iscp;
    }

    public InterrogSintomGeral getInterrogSintomGeral() {
        return isg;
    }

    public void setInterrogSintomGeral(InterrogSintomGeral isg) {
        this.isg = isg;
    }

    public InterrogSintomSME getInterrogSintomSME() {
        return issme;
    }

    public void setInterrogSintomSME(InterrogSintomSME issme) {
        this.issme = issme;
    }

    public InterrogSintomSNPSQ getInterrogSintomSNSPQ() {
        return issnpsq;
    }

    public void setInterrogSintomSNSPQ(InterrogSintomSNPSQ issnpsq) {
        this.issnpsq = issnpsq;
    }   

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (nPront != null ? nPront.hashCode() : 0);
        hash += (sus != null ? sus.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof FichaAdmissaoMedica)) {
            return false;
        }
        FichaAdmissaoMedica other = (FichaAdmissaoMedica) object;
        if ((this.nPront == null && other.nPront != null) || (this.nPront != null && !this.nPront.equals(other.nPront))) {
            return false;
        }
        if ((this.sus == null && other.sus != null) || (this.sus != null && !this.sus.equals(other.sus))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "classesBancodeDados.FichaAdmissaoMedica[ nPront=" + nPront + ", sus=" + sus + " ]";
    }
    
}
